Skip to contentSkip to conversation

build-linux: add workflow for repeated kernel builds

PATCH In review Luis Chamberlain 2 participants 3 messages Sep 19, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 build-linux: add workflow for repeated kernel builds

Add a new workflow that allows building the Linux kernel multiple times to measure build time variations and performance. This is useful for benchmarking build systems and compiler performance testing.

This goes in with monitoring support so we can do AB testing against different filesystems.

Generated-by Claude AI

---

Demo of visualization of results:

https://htmlpreview.github.io/?https://github.com/mcgrof/plot-build/blob/main/index.html

 .gitignore                                    |    1 +
 defconfigs/build-linux                        |   12 +
 defconfigs/build-linux-multifs                |   39 +
 defconfigs/build-linux-xfs-16k                |   15 +
 defconfigs/build-linux-xfs-32k                |   15 +
 defconfigs/build-linux-xfs-4k                 |   15 +
 defconfigs/build-linux-xfs-64k                |   15 +
 defconfigs/build-linux-xfs-8k                 |   15 +
 kconfigs/workflows/Kconfig                    |   20 +
 playbooks/build_linux.yml                     |   30 +
 playbooks/build_linux_results.yml             |   69 ++
 playbooks/roles/build_linux/defaults/main.yml |   25 +
 .../tasks/install-deps/debian/main.yml        |   23 +
 .../build_linux/tasks/install-deps/main.yml   |   12 +
 .../tasks/install-deps/redhat/main.yml        |   23 +
 .../tasks/install-deps/suse/main.yml          |   23 +
 playbooks/roles/build_linux/tasks/main.yml    |  244 ++++
 playbooks/roles/build_qemu/defaults/main.yml  |    2 +
 playbooks/roles/gen_hosts/tasks/main.yml      |   34 +
 .../templates/workflows/build-linux.j2        |  178 +++
 playbooks/roles/gen_nodes/defaults/main.yml   |    1 +
 playbooks/roles/gen_nodes/tasks/main.yml      |  131 +++
 workflows/Makefile                            |    4 +
 workflows/build-linux/Kconfig                 |  255 +++++
 workflows/build-linux/Kconfig.multifs         |  199 ++++
 workflows/build-linux/Makefile                |  101 ++
 workflows/build-linux/scripts/build_linux.py  |  314 +++++
 .../build-linux/scripts/combine_results.py    |   98 ++
 .../build-linux/scripts/generate_summaries.py |  113 ++
 .../build-linux/scripts/visualize_results.py  | 1015 +++++++++++++++++
 workflows/linux/Kconfig                       |    1 +
 31 files changed, 3042 insertions(+)
 create mode 100644 defconfigs/build-linux
 create mode 100644 defconfigs/build-linux-multifs
 create mode 100644 defconfigs/build-linux-xfs-16k
 create mode 100644 defconfigs/build-linux-xfs-32k
 create mode 100644 defconfigs/build-linux-xfs-4k
 create mode 100644 defconfigs/build-linux-xfs-64k
 create mode 100644 defconfigs/build-linux-xfs-8k
 create mode 100644 playbooks/build_linux.yml
 create mode 100644 playbooks/build_linux_results.yml
 create mode 100644 playbooks/roles/build_linux/defaults/main.yml
 create mode 100644 playbooks/roles/build_linux/tasks/install-deps/debian/main.yml
 create mode 100644 playbooks/roles/build_linux/tasks/install-deps/main.yml
 create mode 100644 playbooks/roles/build_linux/tasks/install-deps/redhat/main.yml
 create mode 100644 playbooks/roles/build_linux/tasks/install-deps/suse/main.yml
 create mode 100644 playbooks/roles/build_linux/tasks/main.yml
 create mode 100644 playbooks/roles/gen_hosts/templates/workflows/build-linux.j2
 create mode 100644 workflows/build-linux/Kconfig
 create mode 100644 workflows/build-linux/Kconfig.multifs
 create mode 100644 workflows/build-linux/Makefile
 create mode 100644 workflows/build-linux/scripts/build_linux.py
 create mode 100644 workflows/build-linux/scripts/combine_results.py
 create mode 100755 workflows/build-linux/scripts/generate_summaries.py
 create mode 100755 workflows/build-linux/scripts/visualize_results.py
.gitignore +1 -0
index 720c94b6..faab0e49 100644
@@ -73,6 +73,7 @@ workflows/mmtests/results/
 tmp
 
 workflows/fio-tests/results/
+workflows/build-linux/results/
 
 playbooks/roles/linux-mirror/linux-mirror-systemd/*.service
 playbooks/roles/linux-mirror/linux-mirror-systemd/*.timer
defconfigs/build-linux new file +12 -0
new file mode 100644
index 00000000..3e6b7887
@@ -0,0 +1,12 @@
+# Workflow configuration
+CONFIG_WORKFLOWS=y
+CONFIG_WORKFLOWS_TESTS=y
+CONFIG_WORKFLOWS_LINUX_TESTS=y
+CONFIG_WORKFLOWS_DEDICATED_WORKFLOW=y
+CONFIG_KDEVOPS_WORKFLOW_DEDICATE_BUILD_LINUX=y
+CONFIG_KDEVOPS_WORKFLOW_ENABLE_BUILD_LINUX=y
+CONFIG_BUILD_LINUX_REPEAT_COUNT=100
+CONFIG_BUILD_LINUX_CLEAN_BETWEEN=y
+CONFIG_BUILD_LINUX_COLLECT_STATS=y
+CONFIG_BUILD_LINUX_STORAGE_ENABLE=n
+CONFIG_BUILD_LINUX_USE_LATEST_TAG=y
defconfigs/build-linux-multifs new file +39 -0
new file mode 100644
index 00000000..9386aca4
@@ -0,0 +1,39 @@
+# Workflow configuration
+CONFIG_WORKFLOWS=y
+CONFIG_WORKFLOWS_TESTS=y
+CONFIG_WORKFLOWS_LINUX_TESTS=y
+CONFIG_WORKFLOWS_DEDICATED_WORKFLOW=y
+CONFIG_KDEVOPS_WORKFLOW_DEDICATE_BUILD_LINUX=y
+CONFIG_KDEVOPS_WORKFLOW_ENABLE_BUILD_LINUX=y
+CONFIG_BUILD_LINUX_REPEAT_COUNT=5
+CONFIG_BUILD_LINUX_CLEAN_BETWEEN=y
+CONFIG_BUILD_LINUX_COLLECT_STATS=y
+CONFIG_BUILD_LINUX_STORAGE_ENABLE=y
+CONFIG_BUILD_LINUX_USE_LATEST_TAG=y
+
+# Multi-filesystem testing
+CONFIG_BUILD_LINUX_ENABLE_MULTIFS_TESTING=y
+
+# Test multiple XFS configurations
+CONFIG_BUILD_LINUX_MULTIFS_TEST_XFS=y
+CONFIG_BUILD_LINUX_MULTIFS_XFS_4K_4KS=y
+CONFIG_BUILD_LINUX_MULTIFS_XFS_16K_4KS=y
+CONFIG_BUILD_LINUX_MULTIFS_XFS_32K_4KS=y
+CONFIG_BUILD_LINUX_MULTIFS_XFS_64K_4KS=y
+
+
+# Test ext4
+CONFIG_BUILD_LINUX_MULTIFS_TEST_EXT4=y
+CONFIG_BUILD_LINUX_MULTIFS_EXT4_4K=y
+
+# Test btrfs
+CONFIG_BUILD_LINUX_MULTIFS_TEST_BTRFS=y
+CONFIG_BUILD_LINUX_MULTIFS_BTRFS_DEFAULT=y
+
+# Auto-detect filesystem from node name
+CONFIG_BUILD_LINUX_MULTIFS_USE_NODE_FS=y
+
+CONFIG_ENABLE_MONITORING=y
+CONFIG_MONITOR_DEVELOPMENTAL_STATS=y
+CONFIG_MONITOR_FOLIO_MIGRATION=y
+CONFIG_MONITOR_MEMORY_FRAGMENTATION=y
defconfigs/build-linux-xfs-16k new file +15 -0
new file mode 100644
index 00000000..1f9168e8
@@ -0,0 +1,15 @@
+# Workflow configuration
+CONFIG_WORKFLOWS=y
+CONFIG_WORKFLOWS_TESTS=y
+CONFIG_WORKFLOWS_LINUX_TESTS=y
+CONFIG_WORKFLOWS_DEDICATED_WORKFLOW=y
+CONFIG_KDEVOPS_WORKFLOW_DEDICATE_BUILD_LINUX=y
+CONFIG_KDEVOPS_WORKFLOW_ENABLE_BUILD_LINUX=y
+CONFIG_BUILD_LINUX_REPEAT_COUNT=10
+CONFIG_BUILD_LINUX_CLEAN_BETWEEN=y
+CONFIG_BUILD_LINUX_COLLECT_STATS=y
+CONFIG_BUILD_LINUX_STORAGE_ENABLE=y
+CONFIG_BUILD_LINUX_FSTYPE_XFS=y
+CONFIG_BUILD_LINUX_XFS_BLOCKSIZE_16K=y
+CONFIG_BUILD_LINUX_XFS_SECTORSIZE_4K=y
+CONFIG_BUILD_LINUX_USE_LATEST_TAG=y
defconfigs/build-linux-xfs-32k new file +15 -0
new file mode 100644
index 00000000..0e75296b
@@ -0,0 +1,15 @@
+# Workflow configuration
+CONFIG_WORKFLOWS=y
+CONFIG_WORKFLOWS_TESTS=y
+CONFIG_WORKFLOWS_LINUX_TESTS=y
+CONFIG_WORKFLOWS_DEDICATED_WORKFLOW=y
+CONFIG_KDEVOPS_WORKFLOW_DEDICATE_BUILD_LINUX=y
+CONFIG_KDEVOPS_WORKFLOW_ENABLE_BUILD_LINUX=y
+CONFIG_BUILD_LINUX_REPEAT_COUNT=10
+CONFIG_BUILD_LINUX_CLEAN_BETWEEN=y
+CONFIG_BUILD_LINUX_COLLECT_STATS=y
+CONFIG_BUILD_LINUX_STORAGE_ENABLE=y
+CONFIG_BUILD_LINUX_FSTYPE_XFS=y
+CONFIG_BUILD_LINUX_XFS_BLOCKSIZE_32K=y
+CONFIG_BUILD_LINUX_XFS_SECTORSIZE_4K=y
+CONFIG_BUILD_LINUX_USE_LATEST_TAG=y
defconfigs/build-linux-xfs-4k new file +15 -0
new file mode 100644
index 00000000..73915bb7
@@ -0,0 +1,15 @@
+# Workflow configuration
+CONFIG_WORKFLOWS=y
+CONFIG_WORKFLOWS_TESTS=y
+CONFIG_WORKFLOWS_LINUX_TESTS=y
+CONFIG_WORKFLOWS_DEDICATED_WORKFLOW=y
+CONFIG_KDEVOPS_WORKFLOW_DEDICATE_BUILD_LINUX=y
+CONFIG_KDEVOPS_WORKFLOW_ENABLE_BUILD_LINUX=y
+CONFIG_BUILD_LINUX_REPEAT_COUNT=10
+CONFIG_BUILD_LINUX_CLEAN_BETWEEN=y
+CONFIG_BUILD_LINUX_COLLECT_STATS=y
+CONFIG_BUILD_LINUX_STORAGE_ENABLE=y
+CONFIG_BUILD_LINUX_FSTYPE_XFS=y
+CONFIG_BUILD_LINUX_XFS_BLOCKSIZE_4K=y
+CONFIG_BUILD_LINUX_XFS_SECTORSIZE_4K=y
+CONFIG_BUILD_LINUX_USE_LATEST_TAG=y
defconfigs/build-linux-xfs-64k new file +15 -0
new file mode 100644
index 00000000..66eba603
@@ -0,0 +1,15 @@
+# Workflow configuration
+CONFIG_WORKFLOWS=y
+CONFIG_WORKFLOWS_TESTS=y
+CONFIG_WORKFLOWS_LINUX_TESTS=y
+CONFIG_WORKFLOWS_DEDICATED_WORKFLOW=y
+CONFIG_KDEVOPS_WORKFLOW_DEDICATE_BUILD_LINUX=y
+CONFIG_KDEVOPS_WORKFLOW_ENABLE_BUILD_LINUX=y
+CONFIG_BUILD_LINUX_REPEAT_COUNT=10
+CONFIG_BUILD_LINUX_CLEAN_BETWEEN=y
+CONFIG_BUILD_LINUX_COLLECT_STATS=y
+CONFIG_BUILD_LINUX_STORAGE_ENABLE=y
+CONFIG_BUILD_LINUX_FSTYPE_XFS=y
+CONFIG_BUILD_LINUX_XFS_BLOCKSIZE_64K=y
+CONFIG_BUILD_LINUX_XFS_SECTORSIZE_64K=y
+CONFIG_BUILD_LINUX_USE_LATEST_TAG=y
defconfigs/build-linux-xfs-8k new file +15 -0
new file mode 100644
index 00000000..18a7a065
@@ -0,0 +1,15 @@
+# Workflow configuration
+CONFIG_WORKFLOWS=y
+CONFIG_WORKFLOWS_TESTS=y
+CONFIG_WORKFLOWS_LINUX_TESTS=y
+CONFIG_WORKFLOWS_DEDICATED_WORKFLOW=y
+CONFIG_KDEVOPS_WORKFLOW_DEDICATE_BUILD_LINUX=y
+CONFIG_KDEVOPS_WORKFLOW_ENABLE_BUILD_LINUX=y
+CONFIG_BUILD_LINUX_REPEAT_COUNT=10
+CONFIG_BUILD_LINUX_CLEAN_BETWEEN=y
+CONFIG_BUILD_LINUX_COLLECT_STATS=y
+CONFIG_BUILD_LINUX_STORAGE_ENABLE=y
+CONFIG_BUILD_LINUX_FSTYPE_XFS=y
+CONFIG_BUILD_LINUX_XFS_BLOCKSIZE_8K=y
+CONFIG_BUILD_LINUX_XFS_SECTORSIZE_4K=y
+CONFIG_BUILD_LINUX_USE_LATEST_TAG=y
kconfigs/workflows/Kconfig +20 -0
index 1bd1dd56..1be04c9c 100644
@@ -240,6 +240,14 @@ config KDEVOPS_WORKFLOW_DEDICATE_MINIO
 	  This will dedicate your configuration to running only the
 	  MinIO workflow for S3 storage benchmarking with Warp testing.
 
+config KDEVOPS_WORKFLOW_DEDICATE_BUILD_LINUX
+	bool "build-linux"
+	depends on !KDEVOPS_USE_DECLARED_HOSTS
+	select KDEVOPS_WORKFLOW_ENABLE_BUILD_LINUX
+	help
+	  This will dedicate your configuration to running only the
+	  build-linux workflow for repeated Linux kernel builds.
+
 endchoice
 
 config KDEVOPS_WORKFLOW_NAME
@@ -258,6 +266,7 @@ config KDEVOPS_WORKFLOW_NAME
 	default "fio-tests" if KDEVOPS_WORKFLOW_DEDICATE_FIO_TESTS
 	default "ai" if KDEVOPS_WORKFLOW_DEDICATE_AI
 	default "minio" if KDEVOPS_WORKFLOW_DEDICATE_MINIO
+	default "build-linux" if KDEVOPS_WORKFLOW_DEDICATE_BUILD_LINUX
 
 endif
 
@@ -532,6 +541,17 @@ source "workflows/minio/Kconfig"
 endmenu
 endif # KDEVOPS_WORKFLOW_ENABLE_MINIO
 
+config KDEVOPS_WORKFLOW_ENABLE_BUILD_LINUX
+	bool
+	output yaml
+	default y if KDEVOPS_WORKFLOW_NOT_DEDICATED_ENABLE_BUILD_LINUX || KDEVOPS_WORKFLOW_DEDICATE_BUILD_LINUX
+
+if KDEVOPS_WORKFLOW_ENABLE_BUILD_LINUX
+menu "Configure Linux kernel build workflow"
+source "workflows/build-linux/Kconfig"
+endmenu
+endif # KDEVOPS_WORKFLOW_ENABLE_BUILD_LINUX
+
 config KDEVOPS_WORKFLOW_ENABLE_SSD_STEADY_STATE
        bool "Attain SSD steady state prior to tests"
        output yaml
playbooks/build_linux.yml new file +30 -0
new file mode 100644
index 00000000..c703669b
@@ -0,0 +1,30 @@
+---
+- name: Build Linux Kernel Multiple Times
+  hosts: baseline:dev
+
+  pre_tasks:
+    # Install bootlinux dependencies (for kernel building capabilities)
+    - ansible.builtin.import_tasks: roles/bootlinux/tasks/install-deps/main.yml
+      tags: ["install_deps"]
+
+    # Install monitoring dependencies if monitoring is enabled
+    - ansible.builtin.import_tasks: roles/monitoring/tasks/install-deps/main.yml
+      when:
+        - enable_monitoring|default(false)|bool
+      tags: ["monitoring", "install_deps"]
+
+    # Start monitoring services right before running builds
+    - ansible.builtin.import_tasks: roles/monitoring/tasks/monitor_run.yml
+      when:
+        - enable_monitoring|default(false)|bool
+      tags: ["monitoring", "monitor_run"]
+
+  roles:
+    - build_linux
+
+  post_tasks:
+    # Collect monitoring data after builds complete
+    - ansible.builtin.import_tasks: roles/monitoring/tasks/monitor_collect.yml
+      when:
+        - enable_monitoring|default(false)|bool
+      tags: ["monitoring", "monitor_collect"]
playbooks/build_linux_results.yml new file +69 -0

69 lines not on this page · raw message

playbooks/roles/build_linux/defaults/main.yml new file +25 -0
new file mode 100644
index 00000000..0dcfbf94
@@ -0,0 +1,25 @@
+---
+# Defaults for build_linux role
+
+build_linux_repeat_count: 100
+build_linux_make_jobs: 0
+build_linux_target: "all"
+build_linux_clean_between: false
+build_linux_collect_stats: true
+build_linux_results_dir: "workflows/build-linux/results"
+build_linux_storage_enable: false
+build_linux_device: ""
+build_linux_use_latest_tag: false
+build_linux_allow_modifications: false
+shallow_clone: true
+clone_depth: 1
+
+# Build paths - for build-linux workflow, both source and build are in build filesystem
+linux_source_dir: "{{ data_path }}/build/linux-source"
+linux_build_dir: "{{ data_path }}/build/linux-build"
+
+# We enable building Linux locally, it'll be easier instead of re-inventing
+# all the kconfig for us to leverage the URL parsing. If you do not want
+# to build and installing Linux on the target nodes, you just skip the
+# make linux target.
+linux_git_url: "{{ bootlinux_tree | default('git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git') }}"
playbooks/roles/build_linux/tasks/install-deps/debian/main.yml new file +23 -0
new file mode 100644
index 00000000..1759e348
@@ -0,0 +1,23 @@
+---
+# Dependencies for build-linux workflow timing and statistics
+- name: Install build-linux timing dependencies
+  become: true
+  become_method: sudo
+  ansible.builtin.apt:
+    name:
+      - time  # Required for timing statistics
+    state: present
+  when:
+    - kdevops_workflow_enable_build_linux|default(false)|bool
+
+# Dependencies for build-linux workflow visualization
+- name: Install build-linux visualization dependencies
+  become: true
+  become_method: sudo
+  ansible.builtin.apt:
+    name:
+      - python3-matplotlib
+      - python3-numpy
+    state: present
+  when:
+    - kdevops_workflow_enable_build_linux|default(false)|bool
playbooks/roles/build_linux/tasks/install-deps/main.yml new file +12 -0
new file mode 100644
index 00000000..dd33fd0d
@@ -0,0 +1,12 @@
+---
+- name: Install dependencies to build and test Linux for Debian and Ubuntu systems
+  ansible.builtin.import_tasks: debian/main.yml
+  when: ansible_facts['os_family']|lower == 'debian'
+
+- name: Install dependencies to build and test Linux for Red Hat and Fedora systems
+  ansible.builtin.import_tasks: redhat/main.yml
+  when: ansible_facts['os_family']|lower == 'redhat'
+
+- name: Install dependencies to build and test Linux for SUSE systems
+  ansible.builtin.import_tasks: suse/main.yml
+  when: ansible_facts['os_family']|lower == 'suse'
playbooks/roles/build_linux/tasks/install-deps/redhat/main.yml new file +23 -0
new file mode 100644
index 00000000..57c08498
@@ -0,0 +1,23 @@
+---
+# Dependencies for build-linux workflow timing and statistics
+- name: Install build-linux timing dependencies
+  become: true
+  become_method: sudo
+  ansible.builtin.dnf:
+    name:
+      - time  # Required for timing statistics
+    state: present
+  when:
+    - kdevops_workflow_enable_build_linux|default(false)|bool
+
+# Dependencies for build-linux workflow visualization
+- name: Install build-linux visualization dependencies
+  become: true
+  become_method: sudo
+  ansible.builtin.dnf:
+    name:
+      - python3-matplotlib
+      - python3-numpy
+    state: present
+  when:
+    - kdevops_workflow_enable_build_linux|default(false)|bool
playbooks/roles/build_linux/tasks/install-deps/suse/main.yml new file +23 -0
new file mode 100644
index 00000000..0be2118c
@@ -0,0 +1,23 @@
+---
+# Dependencies for build-linux workflow timing and statistics
+- name: Install build-linux timing dependencies
+  become: true
+  become_method: sudo
+  community.general.zypper:
+    name:
+      - time  # Required for timing statistics
+    state: present
+  when:
+    - kdevops_workflow_enable_build_linux|default(false)|bool
+
+# Dependencies for build-linux workflow visualization
+- name: Install build-linux visualization dependencies
+  become: true
+  become_method: sudo
+  community.general.zypper:
+    name:
+      - python3-matplotlib
+      - python3-numpy
+    state: present
+  when:
+    - kdevops_workflow_enable_build_linux|default(false)|bool
playbooks/roles/build_linux/tasks/main.yml new file +244 -0

244 lines not on this page · raw message

playbooks/roles/build_qemu/defaults/main.yml +2 -0
index 1cb90d0f..cb3aebe8 100644
@@ -12,3 +12,5 @@ qemu_git: "https://github.com/qemu/qemu.git"
 qemu_version: "v7.2.0-rc4"
 qemu_build_dir: "{{ qemu_data }}/build"
 qemu_target: "x86_64-softmmu"
+build_linux_shallow_clone: true
+build_linux_clone_depth: 1
playbooks/roles/gen_hosts/tasks/main.yml +34 -0
index 83829bd6..c4599e4e 100644
@@ -192,6 +192,25 @@
     - ai_enable_multifs_testing|default(false)|bool
     - guestfs_nodes is defined
 
+- name: Load Build-linux nodes configuration for multi-filesystem setup
+  include_vars:
+    file: "{{ topdir_path }}/{{ kdevops_nodes }}"
+    name: build_linux_nodes
+  when:
+    - kdevops_workflows_dedicated_workflow
+    - kdevops_workflow_enable_build_linux|default(false)|bool
+    - build_linux_enable_multifs_testing|default(false)|bool
+    - ansible_hosts_template.stat.exists
+
+- name: Extract Build-linux node names for multi-filesystem setup
+  set_fact:
+    build_linux_enabled_section_types: "{{ build_linux_nodes.guestfs_nodes | map(attribute='name') | list }}"
+  when:
+    - kdevops_workflows_dedicated_workflow
+    - kdevops_workflow_enable_build_linux|default(false)|bool
+    - build_linux_enable_multifs_testing|default(false)|bool
+    - build_linux_nodes is defined
+
 - name: Generate the Ansible inventory file
   tags: ["hosts"]
   vars:
@@ -236,6 +255,21 @@
     - ansible_hosts_template.stat.exists
     - not kdevops_use_declared_hosts|default(false)|bool
 
+- name: Generate the Ansible hosts file for a dedicated Build-linux setup
+  tags: ['hosts']
+  ansible.builtin.template:
+    src: "{{ kdevops_hosts_template }}"
+    dest: "{{ ansible_cfg_inventory }}"
+    force: true
+    trim_blocks: True
+    lstrip_blocks: True
+    mode: '0644'
+  when:
+    - kdevops_workflows_dedicated_workflow
+    - kdevops_workflow_enable_build_linux|default(false)|bool
+    - ansible_hosts_template.stat.exists
+    - not kdevops_use_declared_hosts|default(false)|bool
+
 - name: Verify if final host file exists
   ansible.builtin.stat:
     path: "{{ ansible_cfg_inventory }}"
playbooks/roles/gen_hosts/templates/workflows/build-linux.j2 new file +178 -0

178 lines not on this page · raw message

playbooks/roles/gen_nodes/defaults/main.yml +1 -0
index f88ef659..c2004eb4 100644
@@ -25,6 +25,7 @@ libvirt_provider: false
 libvirt_extra_drive_format: "qcow2"
 libvirt_vcpus_count: 8
 libvirt_mem_mb: 4096
+build_linux_tmpfs_mem_gb: 4096
 gdb_port_conflict: false
 libvirt_enable_gdb: false
 libvirt_gdb_baseport: 1234
playbooks/roles/gen_nodes/tasks/main.yml +131 -0

143 lines not on this page · raw message

workflows/Makefile +4 -0
index ee90227e..05c75a2d 100644
@@ -74,6 +74,10 @@ ifeq (y,$(CONFIG_KDEVOPS_WORKFLOW_ENABLE_MINIO))
 include workflows/minio/Makefile
 endif # CONFIG_KDEVOPS_WORKFLOW_ENABLE_MINIO == y
 
+ifeq (y,$(CONFIG_KDEVOPS_WORKFLOW_ENABLE_BUILD_LINUX))
+include workflows/build-linux/Makefile
+endif # CONFIG_KDEVOPS_WORKFLOW_ENABLE_BUILD_LINUX == y
+
 ANSIBLE_EXTRA_ARGS += $(WORKFLOW_ARGS)
 ANSIBLE_EXTRA_ARGS_SEPARATED += $(WORKFLOW_ARGS_SEPARATED)
 ANSIBLE_EXTRA_ARGS_DIRECT += $(WORKFLOW_ARGS_DIRECT)
workflows/build-linux/Kconfig new file +255 -0

255 lines not on this page · raw message

workflows/build-linux/Kconfig.multifs new file +199 -0

199 lines not on this page · raw message

workflows/build-linux/Makefile new file +101 -0

101 lines not on this page · raw message

workflows/build-linux/scripts/build_linux.py new file +314 -0

314 lines not on this page · raw message

workflows/build-linux/scripts/combine_results.py new file +98 -0

98 lines not on this page · raw message

workflows/build-linux/scripts/generate_summaries.py new file +113 -0

113 lines not on this page · raw message

workflows/build-linux/scripts/visualize_results.py new file +1015 -0

911 lines not on this page · raw message

workflows/linux/Kconfig +1 -0
index 1b057042..428a3022 100644

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.51.0

Part of the diff is not shown here. View the raw message.

#1 lore raw
Quoted 7 lines · Luis Chamberlain

Add a new workflow that allows building the Linux kernel multiple times to measure build time variations and performance. This is useful for benchmarking build systems and compiler performance testing.

This goes in with monitoring support so we can do AB testing against different filesystems.

Quoted 8 lines
Generated-by Claude AI

---

Demo of visualization of results:

https://htmlpreview.github.io/?https://github.com/mcgrof/plot-build/blob/main/index.html

This is really interesting and cool work.

However, I'm generally a strong advocate for reusing projects as much as possible. So this feels like a missed opportunity not to build on existing projects designed for this purpose (e.g. hyperfine [1]).

It would be helpful to understand the reasoning behind choosing one approach (reusing something like hyperfine) over another (adding custom ansible tasks/playbooks...)?

For reference, I put together a quick and hacky example for benchmarking kernel builds using hyperfine and a simple Makefile, available here:

https://github.com/dkruces/linux-benchmarks/

Report example:
https://github.com/dkruces/linux-benchmarks/blob/automation-make/results/mac1611/REPORT.md

To clarify, I'm not oppose in any form to the work here. It's really great. Please, merge & push! :)

One think I'd like to see as part of the report is:
* The kernel version
* The kernel configuration. Hopefully, the fragment work allows to have better control on this. And better when we have SAT support in the kernel
* Toolchain: GCC, LLVM/Clang
* Host info: baremetal/vm, number of cores, memory available, etc.

I've also noticed some inconsistencies between runs, which could be due to memory behavior, folio migration, fragmentation, and similar factors. To ensure full confidence when comparing build times, we should rely on reproducible builds [2].

FYI, I have reproducible build support patches ready. I'll post them today.

#2 lore raw
Quoted 29 lines · Daniel Gomez
Quoted 7 lines · Luis Chamberlain

Add a new workflow that allows building the Linux kernel multiple times to measure build time variations and performance. This is useful for benchmarking build systems and compiler performance testing.

This goes in with monitoring support so we can do AB testing against different filesystems.

Quoted 8 lines
Generated-by Claude AI

---

Demo of visualization of results:

https://htmlpreview.github.io/?https://github.com/mcgrof/plot-build/blob/main/index.html

This is really interesting and cool work.

However, I'm generally a strong advocate for reusing projects as much as possible. So this feels like a missed opportunity not to build on existing projects designed for this purpose (e.g. hyperfine [1]).

It would be helpful to understand the reasoning behind choosing one approach (reusing something like hyperfine) over another (adding custom ansible tasks/playbooks...)?

Quoted 7 lines

For reference, I put together a quick and hacky example for benchmarking kernel builds using hyperfine and a simple Makefile, available here:

https://github.com/dkruces/linux-benchmarks/

Report example:
https://github.com/dkruces/linux-benchmarks/blob/automation-make/results/mac1611/REPORT.md

Awesome!

Quoted 2 lines

To clarify, I'm not oppose in any form to the work here. It's really great. Please, merge & push! :)

I agree that re-use is crucial. The only complexities in re-use is license but MIT is compatible with copyleft-next so we should be able to re-use it.

Quoted 7 lines

One think I'd like to see as part of the report is:
* The kernel version
* The kernel configuration. Hopefully, the fragment work allows to have better control on this. And better when we have SAT support in the kernel
* Toolchain: GCC, LLVM/Clang
* Host info: baremetal/vm, number of cores, memory available, etc.

Quoted 8 lines

I've also noticed some inconsistencies between runs, which could be due to memory behavior, folio migration, fragmentation, and similar factors. To ensure full confidence when comparing build times, we should rely on reproducible builds [2].

FYI, I have reproducible build support patches ready. I'll post them today.

Swweet!

I'll merge and what I think we can do is add a choice option to let us pick the method. We can later just kill the silliest method later.

For now I just need data for evaluation of memory fragmentation runs.

Luis